
<form class="layui-form layui-form-pamel" name="form1" id="form1" method="post">
    <div class="searchbox demoTable" id="searchbox">
        <div class="layui-form-item">
                     <!--<div class="layui-inline">-->
            <!--<label class="layui-form-label">数据个数1：</label>-->
            <!--<div class="layui-input-inline">-->
            <!--<input class="layui-input" type="text" maxlength="50" name="dataBit1" id="dataBit1" placeholder="请输入数据个数1"/>-->
            <!--</div>-->
        <!--</div>-->
                  <!--/   <div class="layui-inline">-->
                        <!--<label class="layui-form-label">数据起始位1：</label>-->
                        <!--<div class="layui-input-inline">-->
                            <!--<input class="layui-input" type="text" maxlength="50" name="startBit1" id="startBit1" placeholder="请输入数据起始位1"/>-->
                        <!--</div>-->
                    <!--</div>-->
            <div class="layui-inline">
                <label class="layui-form-label">设备号：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" maxlength="50" name="managementId" id="managementId" placeholder="请输入设备号"/>
                </div>
            </div>
            <div class="layui-inline">
                <label class="layui-form-label">功能码：</label>
                <div class="layui-input-inline">
                    <input class="layui-input" type="text" maxlength="50" name="functionCode" id="functionCode" placeholder="请输入功能码"/>
                </div>
            </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">设备名称：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="managementName" id="managementName" placeholder="请输入设备名称"/>
                        </div>
                    </div>
                    <div class="layui-inline">
                        <label class="layui-form-label">安装位置：</label>
                        <div class="layui-input-inline">
                            <input class="layui-input" type="text" maxlength="50" name="managementLocation" id="managementLocation" placeholder="请输入安装位置"/>
                        </div>
                    </div>
                    <!--<div class="layui-inline">-->
                        <!--<label class="layui-form-label">数据个数2：</label>-->
                        <!--<div class="layui-input-inline">-->
                            <!--<input class="layui-input" type="text" maxlength="50" name="dataBit2" id="dataBit2" placeholder="请输入数据个数2"/>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="layui-inline">-->
                        <!--<label class="layui-form-label">数据起始位2：</label>-->
                        <!--<div class="layui-input-inline">-->
                            <!--<input class="layui-input" type="text" maxlength="50" name="startBit2" id="startBit2" placeholder="请输入数据起始位2"/>-->
                        <!--</div>-->
                    <!--</div>-->
                     <input type="button" value="查询" onclick="$.table.search()" class="layui-btn layui-btn-red"/>
        </div>
    </div>
</form>

<div style="overflow:auto;width: 100%;padding-bottom: 20px;">
    <table id="simple-table" class="layui-table" lay-filter="simple-table">
    </table>
    <script type="text/html" id="barTable">
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="detailsFlag" title="详情">详情</a>
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="editFlag" title="编辑">编辑</a>
        <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="delFlag" title="删除">删除</a>
    </script>

    <script type="text/html" id="toolbarTable">
        <div class="layui-inline" title="添加" lay-event="addFlag"><i class="layui-icon layui-icon-add-circle"></i></div>
        <div class="layui-inline" title="导出" lay-event="exportExcel"><i class="layui-icon layui-icon-export"></i></div>
    </script>
</div>


<script type="text/javascript">

    var prefix = basePath + "facilities/management";

    var options = {
        id: 'simple-table',
        url: prefix + '/facilitiesManagementlistPage',
        javaField:'managementId',    //主键
        addUrl: prefix + '/addFacilitiesManagement',   //添加
        deleteUrl: prefix + '/deleteFacilitiesManagement',    //删除
        editUrl: prefix + '/toEditFacilitiesManagement?managementId=',   //编辑
        exportUrl: prefix + '/exportFacilitiesManagement',    //导出
        importTemplate: prefix + '/impTempFacilitiesManagement',   //下载导入模板
        importTemplateUrl: prefix + '/impTempFacilitiesManagementUrl',    //导入
        addFull: false, //弹出框最大化
        editFull: false, //弹出框最大化
        toolbar: '#toolbarTable',  //开启工具栏
        modalName:'设备串口协议参数设置',
        cols: [[
            {type:'numbers', title: '序号',width:50}
            ,{field:'managementId', title: '设备号'}
            ,{field:'managementName', title: '设备名称'}
            ,{field:'functionCode', title: '功能码'}
            ,{field:'startBit1', title: '数据起始位1'}
            ,{field:'startBit2', title: '数据起始位2'}
            ,{field:'dataBit1', title: '数据个数1'}
            ,{field:'dataBit2', title: '数据个数2'}
            ,{field:'managementLocation', title: '安装位置'}
            ,{title: '操作' ,width:178, align:'center', toolbar: '#barTable'}
        ]],
        page: true
    };

    var init = $.table.init(options);

</script>
